<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::features::ISMModel结构体 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structpcl_1_1features_1_1_i_s_m_model.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="structpcl_1_1features_1_1_i_s_m_model-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::features::ISMModel结构体 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>The assignment of this structure is to store the statistical/learned weights and other information of the trained Implict Shape Model algorithm.  
 <a href="structpcl_1_1features_1_1_i_s_m_model.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="implicit__shape__model_8h_source.html">implicit_shape_model.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a5bacc0d9fd7c6decfc8f962aa49197b4"><td class="memItemLeft" align="right" valign="top"><a id="a5bacc0d9fd7c6decfc8f962aa49197b4"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#a5bacc0d9fd7c6decfc8f962aa49197b4">ISMModel</a> ()</td></tr>
<tr class="memdesc:a5bacc0d9fd7c6decfc8f962aa49197b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simple constructor that initializes the structure. <br /></td></tr>
<tr class="separator:a5bacc0d9fd7c6decfc8f962aa49197b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7bc0d938cd8faa361c65b2df61de85b"><td class="memItemLeft" align="right" valign="top"><a id="aa7bc0d938cd8faa361c65b2df61de85b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#aa7bc0d938cd8faa361c65b2df61de85b">ISMModel</a> (<a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html">ISMModel</a> const &amp;copy)</td></tr>
<tr class="memdesc:aa7bc0d938cd8faa361c65b2df61de85b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor for deep copy. <br /></td></tr>
<tr class="separator:aa7bc0d938cd8faa361c65b2df61de85b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8357d8182720f7cfdcc9ec53d9be8a3b"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#a8357d8182720f7cfdcc9ec53d9be8a3b">~ISMModel</a> ()</td></tr>
<tr class="separator:a8357d8182720f7cfdcc9ec53d9be8a3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa1bbfa2a5745f94abc2e29de49d0e15"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#aaa1bbfa2a5745f94abc2e29de49d0e15">saveModelToFile</a> (std::string &amp;file_name)</td></tr>
<tr class="memdesc:aaa1bbfa2a5745f94abc2e29de49d0e15"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method simply saves the trained model for later usage.  <a href="structpcl_1_1features_1_1_i_s_m_model.html#aaa1bbfa2a5745f94abc2e29de49d0e15">更多...</a><br /></td></tr>
<tr class="separator:aaa1bbfa2a5745f94abc2e29de49d0e15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7752d924c5d4a19ec3d584e52881bb3c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#a7752d924c5d4a19ec3d584e52881bb3c">loadModelFromfile</a> (std::string &amp;file_name)</td></tr>
<tr class="memdesc:a7752d924c5d4a19ec3d584e52881bb3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method loads the trained model from file.  <a href="structpcl_1_1features_1_1_i_s_m_model.html#a7752d924c5d4a19ec3d584e52881bb3c">更多...</a><br /></td></tr>
<tr class="separator:a7752d924c5d4a19ec3d584e52881bb3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90511c58d2784cdaca51e42f920ebeae"><td class="memItemLeft" align="right" valign="top"><a id="a90511c58d2784cdaca51e42f920ebeae"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#a90511c58d2784cdaca51e42f920ebeae">reset</a> ()</td></tr>
<tr class="memdesc:a90511c58d2784cdaca51e42f920ebeae"><td class="mdescLeft">&#160;</td><td class="mdescRight">this method resets all variables and frees memory. <br /></td></tr>
<tr class="separator:a90511c58d2784cdaca51e42f920ebeae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77926537bb0ecf955dae2500f425d76d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html">ISMModel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#a77926537bb0ecf955dae2500f425d76d">operator=</a> (const <a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html">ISMModel</a> &amp;other)</td></tr>
<tr class="separator:a77926537bb0ecf955dae2500f425d76d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:adb5f36818b76fbcb57e36e0ce876bda0"><td class="memItemLeft" align="right" valign="top"><a id="adb5f36818b76fbcb57e36e0ce876bda0"></a>
std::vector&lt; std::vector&lt; float &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#adb5f36818b76fbcb57e36e0ce876bda0">statistical_weights_</a></td></tr>
<tr class="memdesc:adb5f36818b76fbcb57e36e0ce876bda0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores statistical weights. <br /></td></tr>
<tr class="separator:adb5f36818b76fbcb57e36e0ce876bda0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e515449f74b5e1b651ac1019e9be335"><td class="memItemLeft" align="right" valign="top"><a id="a8e515449f74b5e1b651ac1019e9be335"></a>
std::vector&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#a8e515449f74b5e1b651ac1019e9be335">learned_weights_</a></td></tr>
<tr class="memdesc:a8e515449f74b5e1b651ac1019e9be335"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores learned weights. <br /></td></tr>
<tr class="separator:a8e515449f74b5e1b651ac1019e9be335"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab08d3d3c4df77ee8f86c77cd28b801e"><td class="memItemLeft" align="right" valign="top"><a id="aab08d3d3c4df77ee8f86c77cd28b801e"></a>
std::vector&lt; unsigned int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#aab08d3d3c4df77ee8f86c77cd28b801e">classes_</a></td></tr>
<tr class="memdesc:aab08d3d3c4df77ee8f86c77cd28b801e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores the class label for every direction. <br /></td></tr>
<tr class="separator:aab08d3d3c4df77ee8f86c77cd28b801e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a2bbee7dcf135ce59b3d219c381cc94"><td class="memItemLeft" align="right" valign="top"><a id="a8a2bbee7dcf135ce59b3d219c381cc94"></a>
std::vector&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#a8a2bbee7dcf135ce59b3d219c381cc94">sigmas_</a></td></tr>
<tr class="memdesc:a8a2bbee7dcf135ce59b3d219c381cc94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores the sigma value for each class. This values were used to compute the learned weights. <br /></td></tr>
<tr class="separator:a8a2bbee7dcf135ce59b3d219c381cc94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4a191c684756c11afdbb49ad0f8c704"><td class="memItemLeft" align="right" valign="top"><a id="ad4a191c684756c11afdbb49ad0f8c704"></a>
Eigen::MatrixXf&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#ad4a191c684756c11afdbb49ad0f8c704">directions_to_center_</a></td></tr>
<tr class="memdesc:ad4a191c684756c11afdbb49ad0f8c704"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores the directions to objects center for each visual word. <br /></td></tr>
<tr class="separator:ad4a191c684756c11afdbb49ad0f8c704"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57fea44012b62bb62e7e019331c1109e"><td class="memItemLeft" align="right" valign="top"><a id="a57fea44012b62bb62e7e019331c1109e"></a>
Eigen::MatrixXf&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#a57fea44012b62bb62e7e019331c1109e">clusters_centers_</a></td></tr>
<tr class="memdesc:a57fea44012b62bb62e7e019331c1109e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores the centers of the clusters that were obtained during the visual words clusterization. <br /></td></tr>
<tr class="separator:a57fea44012b62bb62e7e019331c1109e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f6c1408a78d11f7d60299fb25673cbb"><td class="memItemLeft" align="right" valign="top"><a id="a9f6c1408a78d11f7d60299fb25673cbb"></a>
std::vector&lt; std::vector&lt; unsigned int &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#a9f6c1408a78d11f7d60299fb25673cbb">clusters_</a></td></tr>
<tr class="memdesc:a9f6c1408a78d11f7d60299fb25673cbb"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is an array of clusters. Each cluster stores the indices of the visual words that it contains. <br /></td></tr>
<tr class="separator:a9f6c1408a78d11f7d60299fb25673cbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7a14d1495e3cf56f04b68d901622fa9"><td class="memItemLeft" align="right" valign="top"><a id="ad7a14d1495e3cf56f04b68d901622fa9"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a></td></tr>
<tr class="memdesc:ad7a14d1495e3cf56f04b68d901622fa9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores the number of classes. <br /></td></tr>
<tr class="separator:ad7a14d1495e3cf56f04b68d901622fa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae35476b0343c107a91925e6e81e7818c"><td class="memItemLeft" align="right" valign="top"><a id="ae35476b0343c107a91925e6e81e7818c"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a></td></tr>
<tr class="memdesc:ae35476b0343c107a91925e6e81e7818c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores the number of visual words. <br /></td></tr>
<tr class="separator:ae35476b0343c107a91925e6e81e7818c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a607d64662e2f19fbe3a8d79234ead0"><td class="memItemLeft" align="right" valign="top"><a id="a0a607d64662e2f19fbe3a8d79234ead0"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a></td></tr>
<tr class="memdesc:a0a607d64662e2f19fbe3a8d79234ead0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores the number of clusters. <br /></td></tr>
<tr class="separator:a0a607d64662e2f19fbe3a8d79234ead0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a842174ec75a4ffeb634adef848e7dc40"><td class="memItemLeft" align="right" valign="top"><a id="a842174ec75a4ffeb634adef848e7dc40"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html#a842174ec75a4ffeb634adef848e7dc40">descriptors_dimension_</a></td></tr>
<tr class="memdesc:a842174ec75a4ffeb634adef848e7dc40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores descriptors dimension. <br /></td></tr>
<tr class="separator:a842174ec75a4ffeb634adef848e7dc40"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>The assignment of this structure is to store the statistical/learned weights and other information of the trained Implict Shape Model algorithm. </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a8357d8182720f7cfdcc9ec53d9be8a3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8357d8182720f7cfdcc9ec53d9be8a3b">&#9670;&nbsp;</a></span>~ISMModel()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">pcl::features::ISMModel::~ISMModel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Destructor that frees memory. </p>
<div class="fragment"><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;{</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;  <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a90511c58d2784cdaca51e42f920ebeae">reset</a> ();</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;}</div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_a90511c58d2784cdaca51e42f920ebeae"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#a90511c58d2784cdaca51e42f920ebeae">pcl::features::ISMModel::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">this method resets all variables and frees memory.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.hpp:488</div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a7752d924c5d4a19ec3d584e52881bb3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7752d924c5d4a19ec3d584e52881bb3c">&#9670;&nbsp;</a></span>loadModelFromfile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool pcl::features::ISMModel::loadModelFromfile </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>file_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This method loads the trained model from file. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">file_name</td><td>path to file which stores trained model </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;{</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;  <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a90511c58d2784cdaca51e42f920ebeae">reset</a> ();</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;  std::ifstream input_file (file_name.c_str ());</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;  <span class="keywordflow">if</span> (!input_file)</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;  {</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;    input_file.close ();</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;  }</div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160; </div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;  <span class="keywordtype">char</span> line[256];</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160; </div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;  input_file.getline (line, 256, <span class="charliteral">&#39; &#39;</span>);</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;  <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a> = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">&gt;</span> (strtol (line, 0, 10));</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;  input_file.getline (line, 256, <span class="charliteral">&#39; &#39;</span>); <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a> = atoi (line);</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;  input_file.getline (line, 256, <span class="charliteral">&#39; &#39;</span>); <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a> = atoi (line);</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;  input_file.getline (line, 256, <span class="charliteral">&#39; &#39;</span>); <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a842174ec75a4ffeb634adef848e7dc40">descriptors_dimension_</a> = atoi (line);</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160; </div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;  <span class="comment">//read statistical weights</span></div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;  std::vector&lt;float&gt; vec;</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;  vec.resize (<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>, 0.0f);</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;  <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#adb5f36818b76fbcb57e36e0ce876bda0">statistical_weights_</a>.resize (<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a>, vec);</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_class = 0; i_class &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a>; i_class++)</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_cluster = 0; i_cluster &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>; i_cluster++)</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;      input_file &gt;&gt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#adb5f36818b76fbcb57e36e0ce876bda0">statistical_weights_</a>[i_class][i_cluster];</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160; </div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;  <span class="comment">//read learned weights</span></div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;  <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a8e515449f74b5e1b651ac1019e9be335">learned_weights_</a>.resize (<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>, 0.0f);</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_visual_word = 0; i_visual_word &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>; i_visual_word++)</div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;    input_file &gt;&gt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a8e515449f74b5e1b651ac1019e9be335">learned_weights_</a>[i_visual_word];</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160; </div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;  <span class="comment">//read classes</span></div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;  <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#aab08d3d3c4df77ee8f86c77cd28b801e">classes_</a>.resize (<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>, 0);</div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_visual_word = 0; i_visual_word &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>; i_visual_word++)</div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;    input_file &gt;&gt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#aab08d3d3c4df77ee8f86c77cd28b801e">classes_</a>[i_visual_word];</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160; </div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;  <span class="comment">//read sigmas</span></div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;  <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a8a2bbee7dcf135ce59b3d219c381cc94">sigmas_</a>.resize (<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a>, 0.0f);</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_class = 0; i_class &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a>; i_class++)</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;    input_file &gt;&gt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a8a2bbee7dcf135ce59b3d219c381cc94">sigmas_</a>[i_class];</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160; </div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;  <span class="comment">//read directions to centers</span></div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;  <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad4a191c684756c11afdbb49ad0f8c704">directions_to_center_</a>.resize (<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>, 3);</div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_visual_word = 0; i_visual_word &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>; i_visual_word++)</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_dim = 0; i_dim &lt; 3; i_dim++)</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;      input_file &gt;&gt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad4a191c684756c11afdbb49ad0f8c704">directions_to_center_</a> (i_visual_word, i_dim);</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160; </div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;  <span class="comment">//read clusters centers</span></div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;  <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a57fea44012b62bb62e7e019331c1109e">clusters_centers_</a>.resize (<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>, <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a842174ec75a4ffeb634adef848e7dc40">descriptors_dimension_</a>);</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_cluster = 0; i_cluster &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>; i_cluster++)</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_dim = 0; i_dim &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a842174ec75a4ffeb634adef848e7dc40">descriptors_dimension_</a>; i_dim++)</div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;      input_file &gt;&gt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a57fea44012b62bb62e7e019331c1109e">clusters_centers_</a> (i_cluster, i_dim);</div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160; </div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;  <span class="comment">//read clusters</span></div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;  std::vector&lt;unsigned int&gt; vect;</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;  <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a9f6c1408a78d11f7d60299fb25673cbb">clusters_</a>.resize (<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>, vect);</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_cluster = 0; i_cluster &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>; i_cluster++)</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;  {</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size_of_current_cluster = 0;</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    input_file &gt;&gt; size_of_current_cluster;</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;    <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a9f6c1408a78d11f7d60299fb25673cbb">clusters_</a>[i_cluster].resize (size_of_current_cluster, 0);</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_visual_word = 0; i_visual_word &lt; size_of_current_cluster; i_visual_word++)</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;      input_file &gt;&gt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a9f6c1408a78d11f7d60299fb25673cbb">clusters_</a>[i_cluster][i_visual_word];</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;  }</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160; </div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;  input_file.close ();</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;  <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;}</div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_a0a607d64662e2f19fbe3a8d79234ead0"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">pcl::features::ISMModel::number_of_clusters_</a></div><div class="ttdeci">unsigned int number_of_clusters_</div><div class="ttdoc">Stores the number of clusters.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.h:218</div></div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_a57fea44012b62bb62e7e019331c1109e"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#a57fea44012b62bb62e7e019331c1109e">pcl::features::ISMModel::clusters_centers_</a></div><div class="ttdeci">Eigen::MatrixXf clusters_centers_</div><div class="ttdoc">Stores the centers of the clusters that were obtained during the visual words clusterization.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.h:206</div></div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_a842174ec75a4ffeb634adef848e7dc40"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#a842174ec75a4ffeb634adef848e7dc40">pcl::features::ISMModel::descriptors_dimension_</a></div><div class="ttdeci">unsigned int descriptors_dimension_</div><div class="ttdoc">Stores descriptors dimension.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.h:221</div></div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_a8a2bbee7dcf135ce59b3d219c381cc94"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#a8a2bbee7dcf135ce59b3d219c381cc94">pcl::features::ISMModel::sigmas_</a></div><div class="ttdeci">std::vector&lt; float &gt; sigmas_</div><div class="ttdoc">Stores the sigma value for each class. This values were used to compute the learned weights.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.h:200</div></div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_a8e515449f74b5e1b651ac1019e9be335"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#a8e515449f74b5e1b651ac1019e9be335">pcl::features::ISMModel::learned_weights_</a></div><div class="ttdeci">std::vector&lt; float &gt; learned_weights_</div><div class="ttdoc">Stores learned weights.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.h:194</div></div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_a9f6c1408a78d11f7d60299fb25673cbb"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#a9f6c1408a78d11f7d60299fb25673cbb">pcl::features::ISMModel::clusters_</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; unsigned int &gt; &gt; clusters_</div><div class="ttdoc">This is an array of clusters. Each cluster stores the indices of the visual words that it contains.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.h:209</div></div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_aab08d3d3c4df77ee8f86c77cd28b801e"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#aab08d3d3c4df77ee8f86c77cd28b801e">pcl::features::ISMModel::classes_</a></div><div class="ttdeci">std::vector&lt; unsigned int &gt; classes_</div><div class="ttdoc">Stores the class label for every direction.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.h:197</div></div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_ad4a191c684756c11afdbb49ad0f8c704"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#ad4a191c684756c11afdbb49ad0f8c704">pcl::features::ISMModel::directions_to_center_</a></div><div class="ttdeci">Eigen::MatrixXf directions_to_center_</div><div class="ttdoc">Stores the directions to objects center for each visual word.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.h:203</div></div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_ad7a14d1495e3cf56f04b68d901622fa9"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">pcl::features::ISMModel::number_of_classes_</a></div><div class="ttdeci">unsigned int number_of_classes_</div><div class="ttdoc">Stores the number of classes.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.h:212</div></div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_adb5f36818b76fbcb57e36e0ce876bda0"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#adb5f36818b76fbcb57e36e0ce876bda0">pcl::features::ISMModel::statistical_weights_</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; float &gt; &gt; statistical_weights_</div><div class="ttdoc">Stores statistical weights.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.h:191</div></div>
<div class="ttc" id="astructpcl_1_1features_1_1_i_s_m_model_html_ae35476b0343c107a91925e6e81e7818c"><div class="ttname"><a href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">pcl::features::ISMModel::number_of_visual_words_</a></div><div class="ttdeci">unsigned int number_of_visual_words_</div><div class="ttdoc">Stores the number of visual words.</div><div class="ttdef"><b>Definition:</b> implicit_shape_model.h:215</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a77926537bb0ecf955dae2500f425d76d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77926537bb0ecf955dae2500f425d76d">&#9670;&nbsp;</a></span>operator=()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html">pcl::features::ISMModel</a> &amp; pcl::features::ISMModel::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html">ISMModel</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Operator overloading for deep copy. </p>
<div class="fragment"><div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;{</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;  <span class="keywordflow">if</span> (<span class="keyword">this</span> != &amp;other)</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;  {</div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;    this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a90511c58d2784cdaca51e42f920ebeae">reset</a> ();</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160; </div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;    this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a> = other.number_of_classes_;</div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;    this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a> = other.number_of_visual_words_;</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;    this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a> = other.number_of_clusters_;</div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;    this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a842174ec75a4ffeb634adef848e7dc40">descriptors_dimension_</a> = other.descriptors_dimension_;</div>
<div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160; </div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;    std::vector&lt;float&gt; vec;</div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;    vec.resize (<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>, 0.0f);</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;    this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#adb5f36818b76fbcb57e36e0ce876bda0">statistical_weights_</a>.resize (this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a>, vec);</div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_class = 0; i_class &lt; this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a>; i_class++)</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_cluster = 0; i_cluster &lt; this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>; i_cluster++)</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;        this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#adb5f36818b76fbcb57e36e0ce876bda0">statistical_weights_</a>[i_class][i_cluster] = other.statistical_weights_[i_class][i_cluster];</div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160; </div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;    this-&gt;learned_weights_.resize (this-&gt;number_of_visual_words_, 0.0f);</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_visual_word = 0; i_visual_word &lt; this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>; i_visual_word++)</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;      this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a8e515449f74b5e1b651ac1019e9be335">learned_weights_</a>[i_visual_word] = other.learned_weights_[i_visual_word];</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160; </div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;    this-&gt;classes_.resize (this-&gt;number_of_visual_words_, 0);</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_visual_word = 0; i_visual_word &lt; this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>; i_visual_word++)</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;      this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#aab08d3d3c4df77ee8f86c77cd28b801e">classes_</a>[i_visual_word] = other.classes_[i_visual_word];</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160; </div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;    this-&gt;sigmas_.resize (this-&gt;number_of_classes_, 0.0f);</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_class = 0; i_class &lt; this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a>; i_class++)</div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;      this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a8a2bbee7dcf135ce59b3d219c381cc94">sigmas_</a>[i_class] = other.sigmas_[i_class];</div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160; </div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;    this-&gt;directions_to_center_.resize (this-&gt;number_of_visual_words_, 3);</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_visual_word = 0; i_visual_word &lt; this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>; i_visual_word++)</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_dim = 0; i_dim &lt; 3; i_dim++)</div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;        this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad4a191c684756c11afdbb49ad0f8c704">directions_to_center_</a> (i_visual_word, i_dim) = other.directions_to_center_ (i_visual_word, i_dim);</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160; </div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;    this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a57fea44012b62bb62e7e019331c1109e">clusters_centers_</a>.resize (this-&gt;number_of_clusters_, 3);</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_cluster = 0; i_cluster &lt; this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>; i_cluster++)</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_dim = 0; i_dim &lt; this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a842174ec75a4ffeb634adef848e7dc40">descriptors_dimension_</a>; i_dim++)</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;        this-&gt;<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a57fea44012b62bb62e7e019331c1109e">clusters_centers_</a> (i_cluster, i_dim) = other.clusters_centers_ (i_cluster, i_dim);</div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;  }</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;  <span class="keywordflow">return</span> (*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="aaa1bbfa2a5745f94abc2e29de49d0e15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa1bbfa2a5745f94abc2e29de49d0e15">&#9670;&nbsp;</a></span>saveModelToFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool pcl::features::ISMModel::saveModelToFile </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>file_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This method simply saves the trained model for later usage. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">file_name</td><td>path to file for saving model </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;{</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;  std::ofstream output_file (file_name.c_str (), std::ios::trunc);</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;  <span class="keywordflow">if</span> (!output_file)</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;  {</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;    output_file.close ();</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;  }</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160; </div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;  output_file &lt;&lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a> &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;  output_file &lt;&lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a> &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;  output_file &lt;&lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a> &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;  output_file &lt;&lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a842174ec75a4ffeb634adef848e7dc40">descriptors_dimension_</a> &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160; </div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;  <span class="comment">//write statistical weights</span></div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_class = 0; i_class &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a>; i_class++)</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_cluster = 0; i_cluster &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>; i_cluster++)</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;      output_file &lt;&lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#adb5f36818b76fbcb57e36e0ce876bda0">statistical_weights_</a>[i_class][i_cluster] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160; </div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;  <span class="comment">//write learned weights</span></div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_visual_word = 0; i_visual_word &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>; i_visual_word++)</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    output_file &lt;&lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a8e515449f74b5e1b651ac1019e9be335">learned_weights_</a>[i_visual_word] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160; </div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;  <span class="comment">//write classes</span></div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_visual_word = 0; i_visual_word &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>; i_visual_word++)</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    output_file &lt;&lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#aab08d3d3c4df77ee8f86c77cd28b801e">classes_</a>[i_visual_word] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160; </div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;  <span class="comment">//write sigmas</span></div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_class = 0; i_class &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad7a14d1495e3cf56f04b68d901622fa9">number_of_classes_</a>; i_class++)</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;    output_file &lt;&lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a8a2bbee7dcf135ce59b3d219c381cc94">sigmas_</a>[i_class] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160; </div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;  <span class="comment">//write directions to centers</span></div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_visual_word = 0; i_visual_word &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ae35476b0343c107a91925e6e81e7818c">number_of_visual_words_</a>; i_visual_word++)</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_dim = 0; i_dim &lt; 3; i_dim++)</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;      output_file &lt;&lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#ad4a191c684756c11afdbb49ad0f8c704">directions_to_center_</a> (i_visual_word, i_dim) &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160; </div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;  <span class="comment">//write clusters centers</span></div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_cluster = 0; i_cluster &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>; i_cluster++)</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_dim = 0; i_dim &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a842174ec75a4ffeb634adef848e7dc40">descriptors_dimension_</a>; i_dim++)</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;      output_file &lt;&lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a57fea44012b62bb62e7e019331c1109e">clusters_centers_</a> (i_cluster, i_dim) &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160; </div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;  <span class="comment">//write clusters</span></div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_cluster = 0; i_cluster &lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a0a607d64662e2f19fbe3a8d79234ead0">number_of_clusters_</a>; i_cluster++)</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;  {</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;    output_file &lt;&lt; static_cast&lt;unsigned int&gt; (<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a9f6c1408a78d11f7d60299fb25673cbb">clusters_</a>[i_cluster].size ()) &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_visual_word = 0; i_visual_word &lt; static_cast&lt;unsigned int&gt; (<a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a9f6c1408a78d11f7d60299fb25673cbb">clusters_</a>[i_cluster].size ()); i_visual_word++)</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;      output_file &lt;&lt; <a class="code" href="structpcl_1_1features_1_1_i_s_m_model.html#a9f6c1408a78d11f7d60299fb25673cbb">clusters_</a>[i_cluster][i_visual_word] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;  }</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160; </div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;  output_file.close ();</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;  <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该结构体的文档由以下文件生成:<ul>
<li>recognition/include/pcl/recognition/<a class="el" href="implicit__shape__model_8h_source.html">implicit_shape_model.h</a></li>
<li>recognition/include/pcl/recognition/impl/<a class="el" href="implicit__shape__model_8hpp_source.html">implicit_shape_model.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><b>features</b></li><li class="navelem"><a class="el" href="structpcl_1_1features_1_1_i_s_m_model.html">ISMModel</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
